<div class="title">Studenten verwalten</div>
<?php echo $this->element('flashMessage') ?>
<div>
	<div></div>
	<table>
		<tr>
			<th>Vorname</th>
			<th>Nachname</th>
			<th>Telefon</th>
			<th>Matrikelnummer</th>
			<th>Kurs</th>
			<th>Unternehmen</th>
			<th class="noprint">Aktion</th>
		</tr>
		<?php
		$out = '';

		foreach($this->data as $key => $value){
			$out .='<tr>';
			$out .='<td>';
			$out .= $value['Student']['first_name'];
			$out .='</td>';
			$out .='<td>';
			$out .= $value['Student']['family_name'];
			$out .='</td>';
			$out .='<td>';
			$out .= $value['Student']['phone_number'];
			$out .='</td>';
			$out .='<td>';
			$out .= $value['Student']['registration_number'];
			$out .='</td>';
			$out .='<td>';
			$out .= $value['Course']['course_name'];
			$out .='</td>';
			$out .='<td>';
			$out .= $value['Company']['company_name'];
			$out .='</td>';
			$out .='<td class="noprint">';
			$out .= $this->Html->link('Ändern',array('action'=>'update',$value['Student']['id']));
			$out .= ' '.$this->Html->link('Löschen',array('action'=>'delete',$value['Student']['id']));
			$out .='</td>';
			
			$out .='</tr>';
		}
		echo $out;
		?>
	</table>
</div>
